package cn.bbdx.qsh.baking.service.impl;

import cn.bbdx.qsh.baking.mapper.UserMapper;
import cn.bbdx.qsh.baking.pojo.entity.User;
import cn.bbdx.qsh.baking.pojo.vo.UserAdminVO;
import cn.bbdx.qsh.baking.pojo.vo.UserVO;
import cn.bbdx.qsh.baking.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    UserMapper mapper;

    @Override
    public UserVO selectByUserName(String userName) {
        return mapper.selectByUserName(userName);
    }

    @Override
    public int insert(User user) {
        return mapper.insert(user);
    }

    @Override
    public int update(User user) {
        return mapper.update(user);
    }

    @Override
    public String selectImgUrlById(Long id) {
        return mapper.selectImgUrlById(id);
    }

    @Override
    public List<UserAdminVO> select() {
        return mapper.select();
    }

    @Override
    public int deleteById(Long id) {
        return mapper.deleteById(id);
    }
}
